<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        var obj1 = new Object();
        obj1.test = undefined;
        var obj2 = new Object();
        obj2.name = "smyhvae";
        obj1.test = obj2; //对象的属性值也可以是一个对象
        console.log(obj1.test.name);
    </script>
</body>

</html>